package Demo1;

import Demo2.Booklist;
import Demo3.*;

import java.util.Scanner;

public class AdminUser extends Person{
    //构造方法
    public AdminUser(String name, int age) {
        super(name, age);
        this.iFuntions = new IFuntion[]{
                new Exit(),
                new AddBook(),
                new DelBook(),
                new Search(),
                new ShowBook()
        };
    }


    @Override
    public int  menu(){
        //打印菜单
        System.out.println(this.name + "欢迎你来到图书管理系统！");
        System.out.println("****************************");
        System.out.println("*****     0.Exit       *****");
        System.out.println("*****     1.AddBook    *****");
        System.out.println("*****     2.DelBook    *****");
        System.out.println("*****     3.Search     *****");
        System.out.println("*****     4.ShowBook   *****");
        System.out.println("****************************");
        //选择功能
        Scanner scanner = new Scanner(System.in);
        System.out.print("请选择：>");
        int choice = scanner.nextInt();
        //返回选择选项
        return choice;
}


}
